package cn.edu.jxust.common.domain.web;

import cn.edu.jxust.common.response.Result;
import cn.edu.jxust.common.domain.dto.LoginVo;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import javax.servlet.http.HttpServletResponse;

/**
 * @author QiuKangming
 * @version 1.0
 * @description
 * @since 2020/09/15 12:02
 */

public interface ILoginOutController {

    /**
     * 用户登录接口
     * @param loginVo 登录视图对象
     * @param response 请求 response
     * @return Result
     */
    @PostMapping("/login")
    Result AccountLogin(@RequestBody @Validated LoginVo loginVo, HttpServletResponse response);

    /**
     * 登出操作
     * @return Result
     */
    @GetMapping("/logout")
    Result AccountLogout();

    /**
     * 未登录返回结果
     * @return Result
     */
    @GetMapping("/needLogin")
    Result needLogin();

    /**
     * 未授权返回结果
     * @return Result
     */
    @GetMapping("/unauthc")
    Result unauthc();
}
